hysop.operator.curl module

class hysop.operator.curl.Curl(Fin, Fout, variables, implementation=None, base_kwds=None, **kwds)[source]

Bases: ComputationalGraphNodeFrontend

Generate an operator to compute the curl of a Field.

Create an operator that computes the curl of an input field Fin.

Given Fin, a 2D ScalarField or VectorField or a 3D VectorField, compute Fout = curl(Fin).

Only the following configurations are supported:

dim nb_components | dim nb_components

Input: 2 (1,2) | 3 3 Output: 2 (2,1) | 3 3

Parameters:
  • Fin (hysop.field.continuous_field.Field) – Continuous field as input ScalarField or VectorField. All contained field have to live on the same domain.

  • Fout (hysop.field.continuous_field.Field) – Continuous field as output VectorField. All contained field have to live on the same domain.

  • variables (dict) – dictionary of fields as keys and topologies as values.

  • implementation (Implementation, optional, defaults to None) – target implementation, should be contained in available_implementations(). If None, implementation will be set to default_implementation().

  • kwds (dict, optional) – Extra parameters passed towards base class (MultiSpaceDerivatives).

classmethod default_implementation()[source]

Return the default Implementation, should be compatible with available_implementations.

classmethod fd(*args, **kwds)[source]
classmethod implementations()[source]

Should return all implementations as a dictionnary. Keys are Implementation instances and values are either ComputationalGraphNode or ComputationalGraphNodeGenerator.

classmethod spectral(*args, **kwds)[source]
class hysop.operator.curl.SpectralCurl(Fin, Fout, variables, implementation=None, base_kwds=None, **kwds)[source]

Bases: Curl

Create an operator that computes the curl of an input field Fin.

Given Fin, a 2D ScalarField or VectorField or a 3D VectorField, compute Fout = curl(Fin).

Only the following configurations are supported:

dim nb_components | dim nb_components

Input: 2 (1,2) | 3 3 Output: 2 (2,1) | 3 3

Parameters:
  • Fin (hysop.field.continuous_field.Field) – Continuous field as input ScalarField or VectorField. All contained field have to live on the same domain.

  • Fout (hysop.field.continuous_field.Field) – Continuous field as output VectorField. All contained field have to live on the same domain.

  • variables (dict) – dictionary of fields as keys and topologies as values.

  • implementation (Implementation, optional, defaults to None) – target implementation, should be contained in available_implementations(). If None, implementation will be set to default_implementation().

  • kwds (dict, optional) – Extra parameters passed towards base class (MultiSpaceDerivatives).

classmethod default_implementation()[source]

Return the default Implementation, should be compatible with available_implementations.

classmethod implementations()[source]

Should return all implementations as a dictionnary. Keys are Implementation instances and values are either ComputationalGraphNode or ComputationalGraphNodeGenerator.